﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using RioTinto.Data.Interfaces;

namespace RioTinto.Web
{
    public class WebThreadLocalStorageProvider : IThreadLocalStorageProvider
    {
        #region IThreadLocalStorageProvider Members

        public void SaveItem(string key, object value)
        {
            HttpContext.Current.Items.Add(key, value);
        }

        public object GetItem(string key)
        {
            return HttpContext.Current.Items[key];
        }

        public bool ContainsItem(string key)
        {
            return HttpContext.Current.Items.Contains(key);
        }

        public void RemoveItem(string key)
        {
            HttpContext.Current.Items.Remove(key);
        }
        #endregion
    }
}
